CC=gcc
DEBUG=-g
CFLAGS=-Wall -c $(DEBUG)
LFLAGS=-Wall $(DEBUG)
INCLUDES=-I/usr/include -I$(WSFCPP_HOME)/include -I$(WSFCPP_HOME)/include/axis2-1.6.0 -I$(WSFCPP_HOME)/include/axis2-1.6.0/platforms

LIBS=-L/usr/lib -L$(WSFCPP_HOME)/lib -llog4cpp -lpthread -ljansson -laxutil -laxis2_axiom -laxis2_parser -laxis2_engine -lwso2_wsf -laxis2_http_sender -laxis2_http_receiver -ljansson -luuid

C_HEADERS=

C_SRCS=ImaLogger.cpp \
ImaConf.cpp \
ImaService.cpp \
ImaJsonAssembler.cpp \
ImaTcpRequestMaker.cpp \
ImaServiceUtils.cpp \
ImaActiveUsers.cpp

OBJS=ImaLogger.o \
ImaConf.o \
ImaService.o \
ImaJsonAssembler.o \
ImaTcpRequestMaker.o \
ImaServiceUtils.o \
ImaActiveUsers.o

all: libimaservice.so

libimaservice.so: $(OBJS)
	$(CC) -shared $(OBJS) $(LIBS) $(LFLAGS) -o libimaservice.so
	rm -rf *.o

%.o: %.cpp
	@echo 'Building file: $<'
	@echo 'Invoking gcc compiler'
	$(CC) $(CFLAGS) $(INCLUDES) -fPIC -o"$@" "$<"


clean:
	rm -rf *.o libimaservice.so

